package sendway

type SendWayEnum int

const (
	ShortMsg SendWayEnum = iota + 1
	Email
	System
	WeChat
)

//自定义返回枚举类型
type sendWay struct {
	SendType string
	TypeMsg  string
}

func (it SendWayEnum) Get() sendWay {
	switch it {
	case ShortMsg:
		return sendWay{SendType: "1", TypeMsg: "短信"}
	case Email:
		return sendWay{SendType: "2", TypeMsg: "邮件"}
	case System:
		return sendWay{SendType: "3", TypeMsg: "应用内"}
	case WeChat:
		return sendWay{SendType: "4", TypeMsg: "微信"}
	default:
		return sendWay{}
	}
}
